This repository was archived by the owner on Jul 4, 2025. It is now read-only.
feat: support pull and load vision model #2061
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
This pull request introduces several updates to the handling of model configurations, particularly around the inclusion of a new
mmprojfield. The changes span multiple files and primarily focus on ensuring that themmprojfield is appropriately read, stored, and written in the configuration process.Key changes include:
Model Configuration Updates:
mmprojfield to theModelConfigstructure and ensured it is included when converting to and from JSON. (engine/config/model_config.h- [1] [2]RemoteModelConfigstructure to ensure consistent formatting. (engine/config/model_config.h- engine/config/model_config.hL38-R38)YAML Handling Enhancements:
YamlHandler::ReadYamlFileto add themmprojfile to the YAML configuration if it exists. (engine/config/yaml_config.cc- engine/config/yaml_config.ccR44-R57)YamlHandler::ModelConfigFromYamlto read themmprojfield from the YAML configuration. (engine/config/yaml_config.cc- engine/config/yaml_config.ccR148-R149)YamlHandler::UpdateModelConfigandYamlHandler::WriteYamlFileto handle themmprojfield. (engine/config/yaml_config.cc- [1] [2]Model Service and Controller Adjustments:
Models::StartModelmethod to correctly check for the presence of themmprojfield. (engine/controllers/models.cc- engine/controllers/models.ccL536-R537)ModelService::StartModelto include themmprojfield in the JSON data if it is not empty. (engine/services/model_service.cc- engine/services/model_service.ccR953-R961)Fixes Issues
Self Checklist
/v1/chat/completions